package com.study.sbsummary.config;

import com.study.sbsummary.config.database.SqlMetadataConfig;
import com.study.sbsummary.config.kafka.KafkaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;

//@Configuration
@Slf4j
public class ApplicationEventListener implements ApplicationListener<ApplicationStartedEvent> {


    @Autowired
    private KafkaService kafkaService;

    @Autowired
    private SqlMetadataConfig sqlMetadataConfig;

    @Override
    public void onApplicationEvent(ApplicationStartedEvent applicationStartedEvent) {
        log.info("applicationStartedEvent......");
        //消息处理相关的逻辑已经同步调用处理了，所以屏蔽消费和cronPlogReload相关动作
        /*
        plogReloadBiz.startTimerThread();
        kafkaService.startConsumerThreads();
         */

//        sqlMetadataConfig.startLoadMetadata();
    }

}
